home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ssqcst.cst / 00022_Script_Sound and video PlayBack Scripts < prev    next >
Text File  |  1998-09-28  |  5KB  |  146 lines

  1. global gTheBench,gClipOut,gPlayertitles,gXCast
  2.  
  3. -- looks up the title sound using the propertylist gTheBench
  4.  
  5. on TitleSound
  6.   puppetsound 0
  7.   set thesnd = the clickon -10-- modify this number if the position of the play sprites change
  8.   set title = getat(gPlayerTitles,thesnd)
  9.   puppetsound title
  10.   updateStage
  11. end
  12.  
  13. -- plays the title sound for each detail card
  14. on playTitle which 
  15.   puppetsound 0
  16.   set localList = getaProp(gTheBench,#title)
  17.   set theSnd = getat(LocalList,which)
  18.   puppetsound theSnd
  19.   updateStage
  20. end
  21.  
  22.  
  23. --- plays the coach vo over the video after the title sound has finished
  24. -- this script is the same as playcoach  except  it has a timer to wait for the title audio to finish
  25.  
  26. on playVo -- plays vo when player is selected this script has a delay for the title sound
  27.   
  28.   puppetsound 0
  29.   set  TheSound = getaprop(gTheBench,#Ann)
  30.   set LocalVideo = getaprop(gTheBench,#video)
  31.   set current =  the name of member ( the membernum of sprite 48)of castlib gXcast -- get the name of the current video
  32.   set which = getOne( LocalVideo,current)-- look for the position of the current video in the local list
  33.   set playit = getat ( TheSound,which)-- use the resulting number to find the right sound to play
  34.   put playit
  35.   puppetsound playit
  36.   updateStage
  37. end
  38.  
  39.  
  40.  
  41.  
  42.  
  43. -- looks at the current card to decide which sound to play
  44. on playCoach
  45.   puppetsound 0
  46.   if  the membernum of   sprite 7 = 0 then -- if nothing has been selected exit
  47.     set s = (the number of member "JRtitle" of castlib gXCast)+1
  48.     set theone = the name of member s of castlib gXCast
  49.     puppetsound  theone
  50.     updatestage
  51.     exit 
  52.   end if
  53.   set selection = the name of member (the membernum of sprite 48) of castlib gXCast-- find which large card is on the screen 
  54.   set positionList = getaProp(gTheBench,#video)
  55.   set which = getPos(positionList,selection)
  56.   puppetsound 0
  57.   set  TheSound = getaprop(gTheBench,#coach)
  58.   set playit = getat ( TheSound,which)
  59.   puppetsound playit
  60.   updateStage
  61. end
  62.  
  63. -- looks at the current card to descide which sound to play
  64. --because of yet another wonkie avi problem  if the video is paused after losepop is run then the video will
  65. -- disappear so I have to nenut it abit is run momentarily to make sure that theavi stays on the screen
  66. on PlayAnn
  67.   puppetsound 0
  68.   if  the membernum of   sprite 7 = 0 then -- if nothing has been selected exit
  69.     puppetsound "SEQM_D"
  70.     updatestage
  71.     exit 
  72.   end if
  73.   set selection = the name of member (the membernum of sprite 48) of castlib gXCast-- find which large card is on the screen 
  74.   set positionList = getaProp(gTheBench,#video)
  75.   set which = getPos(positionList,selection)
  76.   puppetsound 0
  77.   set  TheSound = getaprop(gTheBench,#ann)
  78.   set playit = getat ( TheSound,which)
  79.   puppetsound playit
  80.   updateStage
  81.   
  82. end
  83.  
  84.  
  85. on loadvideoCard
  86.   -- uses the name of the button clicked to find which video to display
  87.   
  88.   set selection = the name of member (the membernum of sprite the clickon) of castlib gXCast
  89.   set positionList = getaProp(gTheBench,#icons)
  90.   set which = getPos(positionList,selection)
  91.   
  92.   -- changes the Largecard
  93.   set temp1=getaProp(gTheBench,#card)
  94.   set theCard = getat(temp1,which)
  95.   set the membernum of sprite 7 = the number of member theCard of castlib gXCast
  96.   set  the scriptText of member (the number of member  theCard of castlib gXCast) = ¼
  97. The scriptText of member (the number of member  "BigCard" of castlib "Internal")
  98.   updateStage -- to make it look like something is happening take out if too slow
  99.   
  100.   -- changes the video
  101.   set temp =getaProp(gTheBench,#video)
  102.   set theVideo = getat(temp,which)
  103.   set the membernum of sprite 48 = the number of member thevideo of castlib gXCast
  104.   set the movietime of sprite 48 = 0
  105.   set the movierate of sprite 48 = 1
  106.   ProJrOFF
  107.   set  gClipOut = the duration of member theVideo -- -30 -- sets the end point for the script videoplayer
  108.   playTitle which -- plays the title for each detail
  109.   updateStage
  110. end
  111.  
  112. --attach to player script to load the first video gets the name of the first video from 
  113. --the property #video in gTheBench
  114.  
  115. on loadFirstvideo
  116.   set temp =getaProp(gTheBench,#video)
  117.   set theVideo = getat(temp,1)
  118.   set the type of sprite 48 = 16
  119.   set the membernum of sprite 48 = the number of member thevideo of castlib gXCast
  120.   set the ink of sprite 48 = 32
  121.   set the locv of sprite 48 = 104
  122.   set the loch of sprite 48 = 148
  123.   set the visible of sprite 48 =1
  124.   ProJrOFF -- resets the pro and jr Icon to off
  125.   set  gClipOut =( the duration of member theVideo of castlib gXCast)-40 -- sets the end point for the script videoplayer
  126.   updatestage
  127.   set the movietime of sprite 48 =0
  128.   set the movierate of sprite 48 = 0
  129.   setvideovolume
  130. end
  131.  
  132. -- both the first loaded video and the loadvideo must turn off the pro/jr icons 
  133. -- this script does this and is called from loadfirstvideo and loadvideocard
  134. -- reset the icon and the associate position in the button status list gButtonState
  135.  
  136. on ProJrOFF
  137.   repeat with x = 24 to 25
  138.     set test  = getat(gButtonState,x)
  139.     if test > 0 and the membernum of sprite x > 0 then 
  140.       set i = the membernum of sprite x
  141.       setat(gButtonState,X,0)
  142.     end if
  143.   end repeat
  144.   
  145. end
  146.